//分页条件查询 五个参数 =====>对象
import instance from '../utils/request'

export function searchPage(searchParams) {
   return instance.get("/b2cReturnsApply/searchPageByCriteria",{params:searchParams});
}

export function deleteById(entity){
   return instance.post(`/b2cReturnsApply/deleteApply`,entity);
}

export function deleteApplyByApplyIdList(applyIdList){
   return instance.delete(`/b2cReturnsApply/deleteApplyByApplyIdList`,{data:applyIdList});
}

export function addEntity(entity) {
   return instance.post(`/b2cReturnsApply/saveApply`,entity);
}

export function updateEntity(entity) {
   return instance.post(`/b2cReturnsApply/updateApply`,entity);
}

export function approvalApply(entity) {
   return instance.post(`/b2cReturnsApply/approvalApply`,entity);
}

export function searchOrder(searchParams) {
   return instance.get("/sellOrder/searchByPage",{params:searchParams});
}

export function searchOrderDetail(sellCode) {
   return instance.get("/sellOrder/searchDetail", {params: {sellCode:sellCode}});
}

export function searchOne(searchParams) {
   return instance.get("/b2cReturnsApply/searchDetailByApplyId",{params:{applyId:searchParams}});
}

export function applyToInorder(inorderList) {
   return instance.post(`/b2cReturnsApply/applyToInorder`,inorderList);
}